<div class="modal-dialog">
    <div class="modal-content">
        <form role="form" method="post" id="addForm" action="{:U('user/mobile')}">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">修改手机号码
                    <small>[{$mobile}]</small>
                </h4>
            </div>
            <div class="modal-body">
                <input type="hidden" name="id" value="{$id}"/>
                <div class="form-group">
                    <label for="password">新手机号码</label>
                    <input type="text" class="form-control" name="mobile" id="mobile" maxlength="11">
                </div>

            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn-danger">确认保存</button>
            </div>
        </form>
        <script type="text/javascript">
            $("#addForm").submit(function (e) {
                var mobile = $("#mobile").val();
                if (mobile.length < 1) {
                    tips("请填写新手机号码", "danger");
                    return false;
                }
                if (!isMobile(mobile)) {
                    tips("手机号码不正确", "danger");
                    return false;
                }
                return;
            });
        </script>
    </div>
</div>